﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;

namespace IService
{
    public interface IOmPurchaseOrderService
    {
        /// <summary>
        /// 所有进货订单查询
        /// </summary>
        /// <returns></returns>
        Task<List<OmPurchaseOrderDTO>> GetAllOmPurchaseOrderAsync();

        /// <summary>
        /// 查询组织架构信息用于下拉框
        /// </summary>
        /// <returns></returns>
        Task<List<SysOrganizationDTO>> GetOrgInfoForSelectTable();

        /// <summary>
        /// 查询用户信息用于下拉框
        /// </summary>
        /// <returns></returns>
        Task<List<UsersDTO>> GetUserInfoForSelectTable();

        /// <summary>
        /// 查询供应商信息用于下拉框
        /// </summary>
        /// <returns></returns>
        Task<List<BiSupplierDTO>> GetSupplierInfoForSelectTable();

        /// <summary>
        /// 获取全部商品信息用于新增进货订单
        /// </summary>
        /// <returns></returns>
        Task<List<BiProductDTO>> GetAllGoodsInfoForAddGoods();

        /// <summary>
        /// 新增进货订单
        /// </summary>
        /// <param name="opof"></param>
        /// <param name="opodf"></param>
        /// <param name="sadtoList"></param>
        /// <returns></returns>
        Task<int> AddOmpurchaseOrderInfo(OmPurchaseOrderForAdd opof, List<OmPurchaseOrderDetailForAdd> opodfList, List<SysAttachmentDTO> sadtoList);

        /// <summary>
        /// 多条件查询进货订单
        /// </summary>
        /// <param name="sopows"></param>
        /// <returns></returns>
        Task<List<OmPurchaseOrderDTO>> SearchOmPurOrderWithSmthFunc(SearchOmPurOrderWithSmth sopows);

        /// <summary>
        /// 查看进货订单详情信息
        /// </summary>
        /// <param name="upOrderId"></param>
        /// <returns></returns>
        Task<OmPurchaseOrderDTO> CheckOmPurOrderDetailInfo(long upOrderId);

        /// <summary>
        /// 根据upOrderId查询进货订单用于更新
        /// </summary>
        /// <param name="upOrderId"></param>
        /// <returns></returns>
        Task<List<OmPurchaseOrderForUpdate>> SelectOmPurchaseOrderByUpOrderId(long upOrderId);

        /// <summary>
        /// 非审核修改进货订单状态
        /// </summary>
        /// <param name="statu"></param>
        /// <param name="upOrderId"></param>
        /// <returns></returns>
        Task<int> ChangeOmPurOrderStatu(string statu,long upOrderId,long updateBy);

        /// <summary>
        /// 审核进货订单
        /// </summary>
        /// <param name="auditorBy"></param>
        /// <param name="auditorComment"></param>
        /// <param name="statu"></param>
        /// <param name="upOrderId"></param>
        /// <returns></returns>
        Task<int> AuditOmPurOrder(long auditorBy, string auditorComment, string statu, long upOrderId);

        /// <summary>
        /// 批量删除进货订单
        /// </summary>
        /// <param name="upOrderList"></param>
        /// <param name="updateBy"></param>
        /// <returns></returns>
        Task<int> DeleteOmPurOrder(List<long> upOrderList, long updateBy);
    }
}
